package com.xx.account.controller;

import com.xx.account.domain.AccountRecord;
import com.xx.account.mapper.AccountRecordMapper;
import com.xx.account.service.IAccountDataStatisticsService;
import com.xx.account.service.IAccountRecordService;
import com.xx.common.annotation.Log;
import com.xx.common.core.controller.BaseController;
import com.xx.common.core.domain.AjaxResult;
import com.xx.common.core.page.TableDataInfo;
import com.xx.common.enums.BusinessType;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 接单Controller
 *
 * @author ruoyi
 * @date 2024-09-28
 */
@RestController
@RequestMapping("/account/dataStatistics")
public class AccountDataStatisticsController extends BaseController
{
    @Resource
    private IAccountDataStatisticsService accountDataStatisticsService;

    /**
     * 老板接单统计数据
     */
//    @PreAuthorize("@ss.hasPermi('account:statistics:getBossRecord')")
    @GetMapping(value = "/getBossRecord")
    public AjaxResult getBossRecord(AccountRecord accountRecord) {
        return success(accountDataStatisticsService.getBossRecord(accountRecord));
    }

    /**
     * 投手放单统计数据
     */
//    @PreAuthorize("@ss.hasPermi('account:statistics:getWorkerRecord')")
    @GetMapping(value = "/getWorkerRecord")
    public AjaxResult getWorkerRecord(AccountRecord accountRecord) {
        return success(accountDataStatisticsService.getWorkerRecord(accountRecord));
    }

}
